package com.one.rope.mvp.web.common.dto.user.business;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.one.rope.mvp.web.common.enums.MemberPostEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author Weijian.Liu
 * @desc 核心团队成员列表返回
 * @date 2020/2/23 2:10
 */
@Data
@ApiModel
public class CompanyMemberListVO {

  @ApiModelProperty(value = "成员id")
  private Long id;

  @ApiModelProperty(value = "姓名")
  private String name;

  @ApiModelProperty(value = "性别(1-男 2-女)")
  private Integer sex;

  @JsonIgnore
  @ApiModelProperty(value = "任职岗位")
  private Integer postName;

  @ApiModelProperty(value = "任职岗位")
  @JsonProperty("post_name_str")
  private Integer postNameStr;

  @ApiModelProperty(value = "资料完善度")
  @JsonProperty("perfect_degree")
  private String perfectDegree = "30%";

  public String getPostNameStr() {
    if (null != postName) {
      return MemberPostEnum.getName(postName);
    }
    return "";
  }
}
